﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Drawing.Drawing2D;

namespace EnvironmentManagerSystem.A
{
    /// <summary>
    /// 虚线文本的位置
    /// </summary>
    public enum TextPlace
    {
        /// <summary>
        /// 在虚线的上面
        /// </summary>
        Up,
        /// <summary>
        /// 在虚线的下面
        /// </summary>
        Down,
        /// <summary>
        /// 在虚线的中间
        /// </summary>
        Bosom
    }
    /// <summary>
    /// 虚线类
    /// </summary>
    public class BrokenLine
    {
        private int brokenLineY = 0;
        private Color brokenLineColor = Color.Black;
        private string text = "虚线";
        private Color textColor = Color.OrangeRed;
        private Font textFont = new Font("宋体", 11);
        private int textX = 30;
        private TextPlace textPlace = TextPlace.Bosom;
        private DashStyle dashStyle = DashStyle.DashDotDot;
        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="brokenLineY">虚线的Y轴坐标,图片的底部默认Y轴为0</param>
        public BrokenLine(int brokenLineY)
        {
            this.brokenLineY = brokenLineY;
        }
        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="brokenLineY">虚线的Y轴坐标,图片的底部默认Y轴为0</param>
        /// <param name="text">虚线的说明文本</param>
        public BrokenLine(int brokenLineY, string text)
        {
            this.brokenLineY = brokenLineY;
            this.text = text;
        }
        /// <summary>
        /// 构造方法
        /// </summary>
        /// <param name="brokenLineY">虚线的Y轴坐标,图片的底部默认Y轴为0</param>
        /// <param name="text">虚线的说明文本</param>
        /// <param name="textX">虚线说明文本开始处的X轴坐标</param>
        public BrokenLine(int brokenLineY, string text, int textX)
        {
            this.brokenLineY = brokenLineY;
            this.text = text;
            this.textX = textX;
        }
        /// <summary>
        /// 获取或设置虚线的Y轴坐标
        /// </summary>
        public int BrokenLineY
        {
            get
            {
                return brokenLineY;
            }
            set
            {
                brokenLineY = value;
            }
        }
        /// <summary>
        /// 获取或设置虚线的颜色
        /// </summary>
        public Color BrokenLineColor
        {
            get
            {
                return brokenLineColor;
            }
            set
            {
                brokenLineColor = value;
            }
        }
        /// <summary>
        /// 获取或设置虚线的说明文本
        /// </summary>
        public string Text
        {
            get
            {
                return text;
            }
            set
            {
                text = value;
            }
        }
        /// <summary>
        /// 获取或设置说明文本的颜色
        /// </summary>
        public Color TextColor
        {
            get
            {
                return textColor;
            }
            set
            {
                textColor = value;
            }
        }
        /// <summary>
        /// 获取或设置说明文本的字体
        /// </summary>
        public Font TextFont
        {
            get
            {
                return textFont;
            }
            set
            {
                textFont = value;
            }
        }
        /// <summary>
        /// 获取或设置说明文本开始处的X轴坐标
        /// </summary>
        public int TextX
        {
            get
            {
                return textX;
            }
            set
            {
                textX = value;
            }
        }
        /// <summary>
        /// 获取或设置说明文本的位置
        /// </summary>
        public TextPlace TextPlace
        {
            get
            {
                return textPlace;
            }
            set
            {
                textPlace = value;
            }
        }
        /// <summary>
        /// 虚线的样式
        /// </summary>
        public DashStyle DashStyle
        {
            get
            {
                return dashStyle;
            }
            set
            {
                dashStyle = value;
            }
        }
    }
}
